:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #1abc9c;
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
    --light-text: #f8f9fa;
    --border-color: #dee2e6;
    --hover-color: #e9ecef;
}
li{
    list-style: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    color: var(--accent-color);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right .dropdown-toggle {
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-right .dropdown-toggle img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
}

.notification-icon {
    position: relative;
    color: var(--light-text);
    font-size: 1.2rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 主体内容 */
.main-container {
    display: flex;
    margin-top: 60px;
    flex: 1;
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background-color: var(--primary-color);
    color: var(--light-text);
    height: calc(100vh - 60px);
    position: fixed;
    left: 0;
    top: 60px;
    overflow-y: auto;
    transition: all 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-menu {
    padding: 1rem 0;
    list-style: none;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--light-text);
    text-decoration: none;
    transition: all 0.3s;
    gap: 10px;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.sidebar-link.active {
    background-color: var(--accent-color);
    color: white;
}

.sidebar-dropdown {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out;
}

.sidebar-dropdown.show {
    max-height: 500px;
}

.sidebar-dropdown .sidebar-link {
    padding-left: 3.5rem;
}

.dropdown-toggle::after {
    margin-left: auto;
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 1.5rem;
    margin-left: 250px;
}

.page-title {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: none;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

.stats-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    background-color: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

.stats-info h3 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.stats-info p {
    margin: 0;
    opacity: 0.8;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: var(--light-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.table th, .table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table tr:hover {
    background-color: var(--hover-color);
}

.badge {
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

/* 图表容器样式 */
.chart-container {
    height: 300px;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--primary-color);
}

/* 模态框样式 */
.modal-header {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
        overflow: visible;
    }

    .sidebar .logo-text,
    .sidebar .sidebar-link span,
    .sidebar .dropdown-toggle::after {
        display: none;
    }

    .sidebar-dropdown .sidebar-link {
        padding-left: 1.5rem;
    }

    .content {
        margin-left: 70px;
    }
}

@media (max-width: 768px) {
    .stats-row {
        flex-direction: column;
    }

    .header {
        padding: 0.5rem 1rem;
    }

    .header-right {
        gap: 10px;
    }
}